package com.chen.posp;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;

import com.chen.posp.enums.PosManufacturer;
import com.chen.posp.enums.TrxType;
import com.chen.posp.util.PropertyUtil;


/**
 * 常量
 * @author jun.yu
 */
public class Constant {
	public static final String BANK_SERVICE_RESP_SUC_CODE = "ok";                       //银行bankTransactionService成功标志
	public static final String PURCHASE_ORDRE_DESCRIPTION = "purchase";					//订单类型描述
	public static final String ACC_PW_ENCRY_PIN = "6029693030997321";                   // 账户支付密码加密卡号
	public static final int NOTIFY_MANUAL_EXP_DELAY = 30;                   				//回执通知失效时间(分钟)
	public static final String ESSC_CONFIG = "encryptionMessage";
	public static final String ESSC_CONFIG_IP = "ip";
	public static final String ESSC_CONFIG_PORT = "port";
	public static final String ESSC_CONFIG_PORT_TIMEOUT = "timeOut";
	public static final String ESSC_CONFIG_GUNIONIDOFESSCAPI = "gunionIDOfEsscAPI";
	public static final String ESSC_CHECK_VALUE = "0000000000000000";								// checkValue,适用于单倍长密钥，固定的checkValue值

	public static final String SKIP = "SKIP";
	public static final String ESSC_MAC = "zak";
	public static final String ESSC_PIN = "zpk";
	public static final String ESSC_MK = "zmk";

	public static final String DEFAULT_REGION = "default";
	public static final String HESSIAN_SECRET_KEY = "hessianSecretKey";								// hessian接口签名密钥
	public static final String SUCCESS_RESPONSE_CODE = "ok";										// 交易成功返回标识
	public static final String SYSTEM_DEFAULT_FLAG = "DEFAULT";										// default
	public static final String SYSTEM = "SYSTEM";
	public static final String AGENT_HESSIAN_KEY = "agentHessaianKey";

	public static final String RATESASSORT_CODE_CAPPING_50 = "Q00005F";								// 封顶分类码
	public static final String RATESASSORT_CODE_CAPPING_20 = "Q00002F";								// 封顶分类码
	public static final String RATESASSORT_CODE_CAPPING_10 = "Q00001F";								// 封顶分类码
	public static final String RATESASSORT_CODE_CAPPING_05 = "Q000005F";							// 封顶分类码
	
	public static final String REGIONNAME_BANKCARDINFO_CACHE = "pos_bankcardinfo_cache";
	public static final String CACHE_BANKCARDINFO = "cache_bankcardinfo";

	public final static int FIELD_ID_START = 0;														// 用于标识报文的域开始最小数
	public final static int FIELD_ID_END = 64;														// 用于标识报文的域结束最大数
	public final static int LEN_BITMAP_BASE = 8;													// 主位图的长度
	public final static int LEN_BITMAP_EXTENDED = 8;												// 扩展位图的长度
	public final static int LEN_POS_MESSAGETYPE = 2;												// 信息类型的长度
	public final static String CONTENT_POS_TPUD = "6000870000";										// TPUD
	public final static int LEN_POS_TPUD = 5;														// TPUD的长度
	public final static int LEN_POS_Message = 6;													// 报文头长度
	public final static int LEN_CONTENT = 2;														// 报文长度
	public final static String CONTENT_POS_Message = "602200000000";								// 报文头
	public final static int LEN_POS_LRI = 3;														// 拨号POS标识长度
	public final static String CONTENT_POS_LRI = "LRI";												// 拨号POS标识
	public final static int LEN_POS_PHONE = 8;														// 拨号POS电话位长度
	public final static int LEN_POS_NODE = 6;														// 拨号POS节点信息

	public static final String MESSAGE_SIGN_IN_MTYPE = "0800";										// 签到
	public static final String RETURN_SIGN_IN_MTYPE = "0810";										// 签到
	public static final String MESSAGE_SIGN_OFF_MTYPE = "0820";										// 签退
	public static final String RETURN_SIGN_OFF_MTYPE = "0830";										// 签退
	public static final String MESSAGE_SETTLE_MTYPE = "0500";										// 批结算
	public static final String RETURN_SETTLE_MTYPE = "0510";										// 批结算
	public static final String MESSAGE_BATHUP_MTYPE = "0320";										// 批上送
	public static final String RETURN_BATHUP_MTYPE = "0330";										// 批上送
	public static final String MESSAGE_ORDERINQUIRY_MTYPE = "0700";									// 订单查询
	public static final String MESSAGE_CODTYPE_MTYPE = "0720";										// 物流签收
	public static final String MESSAGE_ORDERCONFIRM_MTYPE = "0740";                                 // 交易确认
	public static final String RETURN_ORDERCONFIRM_MTYPE = "0750";                                  // 交易确认
	public static final String MESSAGE_CURRCY_CODE_TRANS = "156";
	public static final String POS_ENTRY_MODE_CODEA = "021";
	public static final String POS_ENTRY_MODE_CODEB = "022";
	
	/**
	 * 脚本处理结果通知  add by hongchao.li 2013-9-11 
	 */
	public static final String MESSAGE_SCRIPT_RESULT_NOTIFY = "0620";
	
	/**
	 * 状态上送报文-查询，IC卡公钥下载交易，60.3的值   add  by hongchao.li 2013-8-19
	 */
	public static final String NETMANAGEINFOCODE_CAPK_QUERY = "372";
	/**
	 * 参数传递报文-下载，IC卡公钥下载交易，60.3的值   add  by hongchao.li 2013-8-19
	 */
	public static final String NETMANAGEINFOCODE_CAPK_DOWNLOAD = "370";
	/**
	 * 参数传递报文-下载结束，IC卡公钥下载交易，60.3的值   add  by hongchao.li 2013-8-19
	 */
	public static final String NETMANAGEINFOCODE_CAPK_NOTIFY = "371";
	/**
	 * 状态上送报文-查询，IC卡AID下载交易，60.3的值   add  by hongchao.li 2013-8-19
	 */
	public static final String NETMANAGEINFOCODE_ICAID_QUERY = "382";
	/**
	 * 参数传递报文-下载，IC卡AID下载交易，60.3的值   add  by hongchao.li 2013-8-19
	 */
	public static final String NETMANAGEINFOCODE_ICAID_DOWNLOAD = "380";
	/**
	 * 参数传递报文-下载结束，IC卡AID下载交易，60.3的值   add  by hongchao.li 2013-8-19
	 */
	public static final String NETMANAGEINFOCODE_ICAID_NOTIFY = "381";

	public static final String POS_SEQUENCE = "SEQ_POS_RETRIVL_NUM";
	public static final String POS_ACQ_INST_ID_CODE = "00010000";
	public static final String ACCEPT_PARTY_ID_CODE = "10000001";									// 受理方标识码

	// frp code
	public static final String FRP_CODE_BOC_SHENZHEN = "9002001";
	public static final String FRP_CODE_CCB_SHENZHEN = "9002002";
	public static final String FRP_CODE_ICBC_GUANGXI = "9002003";
	public static final String FRP_CODE_BOC_BEIJING = "9002006";
	public static final String FRP_CODE_BOC_GUANGDONG = "9002005";
	public static final String FRP_CODE_ABC_SHENZHEN = "9002007";
	public static final String FRP_CODE_UNIONPAY_SHANGHAI = "9002008";

	public static final String FRP_CODE_BCM_QINGDAO = "9002009";
	public static final String FRP_CODE_CEB_BEIJING = "9002010";
	public static final String FRP_CODE_UNIONPAY = "9002011";
	public static final String FRP_CODE_ICBC_SHANXI = "9002012";
	
	public static final String FRP_CODE_UNIONPAY_NINGBO = "9002013";
	public static final String FRP_CODE_ABC_SZ = "9002007"; //深圳农行
	public static final String FRP_CODE_UNIONPAY_GZ = "9002015";//贵州银联
	public static final String FRP_CODE_PREPAIDARD_YEEPAY = "1001082";								// 预付费卡在核心平台的FRPID
	public static final String ISSUER_BANKCODE_PREPAIDARD_YEEPAY = "PREPAYCARD";					// 预付费卡的发卡行BANKCODE
	public static final String ACQUIRER_BANKCODE_PREPAIDARD_YEEPAY = "PREPAYCARD";					// 预付费卡的收单行BANKCODE
	public static final String ISSUER_BANKCODE_DEBIT_YEEPAYPOS = "DEBITYEEPAYPOS";					// 易宝POS的代扣BANKCODE
	public static final String FRP_CODE_DEBIT_YEEPAYPOS = "1002001";								// 易宝POS代扣的FRPID
	// public static final String PLATFORM_PREPAIDARD_CUSTOMERNUMBER = "10040006515";//预付费卡在核心平台的收款商户(测试)
	public static final String PLATFORM_PREPAIDARD_CUSTOMERNUMBER = "10011219567";					// 预付费卡在核心平台的收款商户(生产)
	public static final String PREPAIDARD_TRANSLATEPIN_NODENAME = "pos.prepaidcard.zpk";			// 预付费卡在加密机中PIN转加密的节点名称
	public static final String PREPAIDARD_HESSIAN_SECRETKEY = "prepaidCardHessianSecretKey";		// 预付费卡的参数加密密钥
	public static long TIME_SPACE = 90000;															// 与预付费卡平台时间戳的间隔时间
	public static final String PAY1_CUSTOMER_NUMBER = "10011879253";											//缴费易商户编号

	public static final String JRTJ_HESSIAN_SECRETKEY = "jRTJHessianSecretKey";						// 今日特价的参数加密密钥
	public static final String JRTJ_SALEQUERY_TYPE = "SALEQUERY";									// 今日特价消费查询类型
	public static final String JRTJ_MEMBERQUERY_TYPE = "MEMBERQUERY";								// 今日特价会员充值查询类型
	public static final String JRTJ_SHOPQUERY_TYPE = "SHOPQUERY";									// 今日特价商户充值查询类型
	public static final String JRTJ_ORDERPAYQUERY_TYPE = "ORDERPAYQUERY";							// 今日特价账单支付查询类型
	public static final String JRTJ_MEMBERRECHARGE_TYPE = "MEMBERRECHARGE";							// 今日特价会员充值类型
	public static final String JRTJ_MEMBERRECHARGEVOID_TYPE = "MEMBERRECHARGEVOID";					// 今日特价会员充值撤销类型
	public static final String JRTJ_BUSINESSRECHARGE_TYPE = "BUSINESSRECHARGE";						// 今日特价商户充值类型
	public static final String JRTJ_BUSINESSRECHARGEVOID_TYPE = "BUSINESSRECHARGEVOID";				// 今日特价商户充值撤销类型
	public static final String JRTJ_MEMBERPURCHASE_TYPE = "MEMBERPURCHASE";							// 今日特价会员消费类型
	public static final String JRTJ_MEMBEPURCHASEVOID_TYPE = "MEMBEPURCHASEVOID";					// 今日特价会员消费撤销类型
	public static final String JRTJ_ORDERPAY_TYPE = "ORDERPURCHASE";								// 今日特价账单支付类型

	// public static final String BOC_FRPINTER_CODE = "BOC";//深圳中行签到,批结算的FRPCODE
	public static final String SEQUENCE_CODE_NAME = "SEQ_POS_BANKREQUESTID_";
	public static final String SETTLE_BOC_ID = "boc";
	public static final String AUTHR_ID_RESP = "00";
	public static final String FRPCODE_MCC_ALLBANK = "ALLBANK";										// 支持全行业商户的MCC码

	public static final String POS_SEQ_BOC = "POS_SEQ_BOC";
	public static final String POS_SEQ_TERMNLID = "SEQ_POS_TERMNLID";

	public static final String BANKPOS_ONCE_TRXLIMIT = "BANKPOS_ONCE_TRXLIMIT";
	public static final String CUSTOMERFRPCONFIG_BANKCODE_ALL = "ALL";

	public static final String SETTLE_START_TIME = "23:00:00";
	public static final String SETTLE_END_TIME = "00:00:00";
	public static final String REPEAL_LIMIT_TIME = "00:00:00";
	public static final String BACKOUT_LIMIT_TIME = "23:00:00";
	
	
	
	public static final String CCB_SETTLE_START_TIME = "22:30:00";
	public static final String CCB_SETTLE_END_TIME = "23:00:00";
	 

	/**
	 * 加急出款商户标识，在customerprofile表中name为URGENT_TRANSFER的记录  add haifeng.lu 2013-11-15
	 */
	public static final String URGENT_TRANSFER = "URGENT_TRANSFER"; 
	/**
	 * 联通自助终端商户标识，存放在customer表中remark字段  add by hongchao.li 2013-7-24
	 */
	public static final String UNICOM_SELFSERVICE = "UNICOM_SELFSERVICE"; 
	/**
	 * 联通MINI终端商户标识，存放在customer表中remark字段  add by hongchao.li 2013-7-24
	 */
	public static final String UNICOM_MINI = "UNICOM_MINI";
	public static final String CCB_SEQ_BANKBATCHNO_CODE = "SEQ_POS_BANKBATCH_9002002";
	public static final String BCM_QD_SEQ_BANKBATCHNO_CODE = "SEQ_POS_BANKBATCH_9002009";

	public static final String RESPONSECODE_POS = "ResponseCode_POS";
	public static final String RESPONSECODE_KYP = "ResponseCode_KYP";
	public static final String BUSINESS_POS = "business_pos";
	public static final String SYSTEM_BUSY = "system.busy";
	public static final String OK = "ok";

	public static final String WITHHOLE_PURCHASE_FLAG = "WHITH_HOLD";                              //商户代扣权限的标志
	public static final String WITHHOLE_COMPATABLE_OFFBANK_FLAG = "WITHHOLD_COMPATIBLE_OFFBANK";   //商户代扣是否兼容线下银行卡的标志
	

	// ---------------------------define pos menu starts---------------------------------
	public static final String TRX_MONITOR_MAC_CHECK = "TXM0004";									// 交易监控编号

	public static final String EDU_ORDERINQUIRY = "001";											// 教育线订单查询
	public static final String QUICK_ORDER_PAY_CODE = "003";										// 快速订单支付标识
	public static final String DISCOUNT_PURCHASE = "038";											// 折扣消费
	public static final String DISCOUNT_CARD_PAY = "039";											// 打折卡支付
	public static final String COUPON_PURCHASE = "044";												// 折扣消费--优惠券
	public static final String KEEPBOOK = "045";													// 现金记账--（打折卡）

	// -------------jianwei.ma
	public static final String COUPON_PURCHASE_BATCH = "801";										// 批量--优惠券
	public static final String COUPON_SALES_BATCH = "802";											// 批量--优惠券--消费
	public static final String KEEPBOOK_BATCH = "803";												// 批量--现金记账
	public static final String COUPON_QUERY_BATCH = "804";											// 批量--查询发券
	public static final String COUPON_COMMIT_BATCH = "805";											// 批量--消券
	public static final String QQ_MEMBER_CHECK = "806";												// 易优客会员验证
	public static final String QQ_MEMBER_PURCHASE = "807";											// 易优客会员消费
	public static final String MANBAI_MEMBER_PURCHASE = "808";										// 会员卡支付--会员卡 满百
	public static final String MANBAI_PHONE_PURCHASE = "809";										// 会员卡支付--手机号 满百
	public static final String QQ_MEMBER_KEY = "813";												// 易优客推荐码验证
	public static final String QQ_MEMBER_NOTIFY = "810";											// 易优客通知返利
	public static final String QQ_MEMBER_CASH = "811";												// 易优客现金消费
	public static final String QQ_MEMBER_ACTIVE = "812";											// 易优客激活店铺
	public static final String QQ_MEMBER_PWD = "814";												// 易优客收银员密码验证
	public static final String QQ_MEMBER_REG = "815";												// 易优客会员注册
	public static final String QQ_MEMBER_CHOOSEEVENT = "816";										// 易优客会员优惠活动信息
	public static final String QQ_MEMBER_CHECK_ACTIVITIES = "817";									// 易优客会员验证(活动版本)
	public static final String QQ_PREPAIDCARD_ACTIVE_PRE = "818";									// 易优客-储值卡激活(通知预付费平台)
	public static final String QQ_PREPAIDCARD_CASH_RECHARGE = "819";								// 易优客-储值卡现金充值
	public static final String QQ_PREPAIDCARD_PURCHASE = "820";										// 易优客-储值卡消费
	public static final String QQ_PREPAIDCARD_RECHARGE = "821";										// 易优客-储值卡充值
	public static final String QQ_PREPAIDCARD_QUERY = "822";										// 易优客-储值卡查询
	public static final String QQ_PREPAIDCARD_ACTIVE_EYOUK = "823";									// 易优客-储值卡激活(通知易优客平台)
	public static final String QQ_PHONEPAY_PRINT = "824";											// 易优客-手机支付打印
	public static final String QQ_PHONEPAY_QUERY = "825";											// 易优客-手机支付查询
	public static final String QQ_PHONEPAY_REFUND_QUERY = "826";									// 易优客-手机支付退款查询
	public static final String QQ_PHONEPAY_REFUND = "827";											// 易优客-手机支付退款
	public static final String QQ_PHONEPAY_PRINT_NOTIFY = "828";									// 易优客-手机支付-打印通知
	public static final String QQ_PAD_REFUND = "829";												// 易优客-PAD退款
	/**
	 * 虚拟卡只有刷卡充值是交易接口，其他都是通知
	 */
	public static final String QQ_VIRTUALPAY_RECHARGE_CARD = "830";									// 易优客-虚拟支付-刷卡充值
	public static final String QQ_VIRTUALPAY_NOTIFY_EYOUK = "831";									// 易优客-虚拟支付-通知易优客
	public static final String QQ_VIRTUALPAY_PURCHASE = "832";										// 易优客-虚拟支付-消费
	public static final String QQ_VIRTUALPAY_RECHARGE_NOTIFY = "833";								// 易优客-虚拟支付-充值(现金）
	public static final String QQ_VIRTUALPAY_RURCHASEVOID = "834";									// 易优客-虚拟支付-消费撤销
	public static final String QQ_VIRTUALPAY_PHONEMESSAGE = "835";									// 易优客-虚拟支付-验证短信
	public static final String QQ_VIRTUALPAY_PWRESET = "836";									    // 易优客-虚拟支付-密码重置
	public static final String QQ_VIRTUALPAY_OPENCARD = "837";										// 易优客-虚拟支付-办卡 现金充值
	public static final String QQ_VIRTUALPAY_OPENCARD_USERCARD = "853";								// 易优客-虚拟支付-办卡 刷卡充值
	public static final String QQ_VIRTUALPAY_GETCODE = "838";										// 易优客-虚拟支付-获取二维码
	
	public static final String QQ_VIRTUALPAY_REVERSAL_CARD = "861";										//虚拟支付  刷卡撤销冲正
	
	/**
	 * new by yuzj
	 */
	public static final String QQ_VIRTUALPAY_REFUND_NOTIFY = "849";								    // 易优客-虚拟支付-退款通知
	public static final String QQ_VIRTUALPAY_RETURNCARD_NOTIFY = "850";								//易优客-虚拟支付-退卡
	public static final String QQ_VIRTUALPAY_QUERY = "852";											// 易优客-余额查询
	/**
	 * new end
	 */
	
	public static final String QQ_REDPACKET_PURCHASE = "839";										// 易优客-红包返利消费
	public static final String QQ_TRX_COMPLETE = "840";										        // 易优客-交易完成通知
	public static final String QQ_GIVE_REDPACKET = "841";										    // 易优客-领取红包请求
	public static final String QQ_REDPACKET_REVERSAL = "842";										     // 易优客-红包消费冲正
	public static final String QQ_REDPACKET_CANCEL = "843";										     // 易优客-刷卡消费撤销
	public static final String QQ_REDPACKET_CASHI_CANCEL = "851";										     // 易优客-现金消费撤销
	public static final String QQ_REDPACKET_CARD_REFUND = "844";                                        // 哆啦宝-刷卡消费退款
	public static final String QQ_REDPACKET_CASHI_REFUND = "849";                                        // 哆啦宝-现金消费退款
	/**
	 * add by yuzj begin--------
	 */
	public static final String QQ_REDPACKET_DIRECT_BANKCARD = "845";                               // 哆啦宝-（刷卡）
	public static final String QQ_REDPACKET_REDIRECT_BANKCARD = "846";                              // 哆啦宝-（红包刷卡）
	public static final String QQ_REDPACKET_CASHI = "847";                                        // 哆啦宝-（红包现金）
	public static final String QQ_NOREDPACKET_BANKCARD = "848";                                      // 哆啦宝-（非红包刷卡）
	/**
	 * add by yuzj end----------
	 */                                        // 易优客-红包消费退款
	
	public static final String HXMKL_CUSTOMER_QUERY = "048";
	// 红星美凯龙店铺查询
	public static final String HXMKL_CUSTOMER_PURCHASE = "049";										// 红星美凯龙店铺消费
	public static final String HXMKL_VOID_REFUND_COMMONRETURN = "000";								// 红星美凯龙撤销和退货处理59域返回

	public static final String PREPAIDCARD_INQUIRY_HZR = "026";										// 预付费卡查询
	public static final String PREPAIDCARD_PURCHASE_HZR = "024";									// 预付费卡消费
	public static final String PREPAIDCART_PURCHASE_COMMISSION = "919";								// 预付费卡消费-委托收款
	public static final String PREPAIDCARD_RECHARGE_HZR = "025";									// 预付费卡充值
	public static final String PREPAIDCARD_CARD_STATUS = "0";										// 预付费卡卡状态
	public static final int PREPAIDCARD_RESULT_CODE = 0;											// 预付费卡返回结果代码（0：成功 1：失败）
	public static final String PREPAIDCARD_RETURN_CODE = "00";										// 预付费卡返回业务编码（00：消费正常）
	public static final String PREPAIDCARD_QUERY_TYPE = "QUERY";									// 预付费卡查询交易类型
	public static final String PREPAIDCARD_LOADQUERY_TYPE = "LOADQUERY";							// 预付费卡充值查询交易类型
	public static final String PREPAIDCARD_SALE_TYPE = "SALE";										// 预付费卡消费交易类型
	public static final String PREPAIDCARD_LOAD_TYPE = "LOAD";										// 预付费卡充值交易类型
	public static final String PREPAIDCARD_REVERSAL_TYPE = "REVERSAL";								// 预付费卡消费/充值冲正交易类型
	public static final String PREPAIDCARD_YEEPAY_SING = "YEEPAY";									// 预付费卡识别信息
	public static final String PREPAIDCARD_YEEPAY_CHANNEL = "10";									// 预付费卡支付渠道 10：POS机

	public static final String JRTJ_MEMBERPURCHASE = "027";											// 今日特价会员消费
	public static final String JRTJ_MEMBERRECHARGE = "028";											// 今日特价会员充值
	public static final String JRTJ_BUSINESSRECHARGE = "029";										// 今日特价商户充值
	public static final String JRTJ_INTEGRALPURCHASE_MEMBERRE = "030";								// 今日特价通用积分消费(会员积分)
	public static final String JRTJ_INTEGRALPURCHASE_BUSINESSRE = "031";							// 今日特价通用积分消费(商户积分)
	public static final String JRTJ_INTEGRALRECHARGE = "032";										// 今日特价通用积分充值
	public static final String JRTJ_INDUSTRYSALE = "033";											// 今日特价行业积分消费
	public static final String JRTJ_INDUSTRYRECHARGE = "034";										// 今日特价行业积分充值
	public static final String JRTJ_INTEGRALQUERY = "035";											// 今日特价通用积分查询
	public static final String JRTJ_INDUSTRYQUERY = "036";											// 今日特价行业积分查询
	public static final String JRTJ_TRXRESCODE_SUSSESS = "0";										// 今日特价交易成功返回码

	public static final String KYP_PURCHASE = "060";												// 卡易拍消费
	public static final String KYP_PURCHASE_REFUND = "061";											// 卡易拍退货

	public static final String FUND_OPEN_ORDER_QUERY = "064";										// 基金开户订单查询
	public static final String FUND_PAY_ORDER_QUERY = "065";										// 基金支付订单查询
	public static final String FUND_PURCHASE = "062";												// 基金消费
	public static final String FUND_OPEN_ACCOUNT = "063";											// 基金开户

	// 今日特价行业积分查询
	public static final String JRTJ_MORE = "046";													// 今日特价更多业务
	public static final String JRTJ_ORDERPAY = "047";												// 今日特价帐单支付
	public static final String RFTY_VOID_POINTS = "043";											// 瑞富通银，撤销积分

	public static final String POS_COMMISSION_PURCHASE_TYPE = "040";								// 金融委托收款银行卡消费

	public static final String COD_ORDERPURCHASE = "005";											// 物流订单消费-银行卡
	public static final String COD_SIGNORDER_NEWLAND = "006";										// 物流运单签收，新大陆厂商
	public static final String COD_ORDEREXCEPTION_NEWLAND = "007";									// 物流异常订单，新大陆厂商
	public static final String COD_ORDERINQUIRY_NEWLAND = "008";									// 物流派单查询，新大陆厂商
	public static final String COD_SIGNIN_NEWLAND = "009";											// 物流操作员签到，新大陆厂商
	public static final String COD_ORDERPURCHASE_ZT = "011";										// 物流订单消费，证通厂商
	public static final String COD_SIGNORDER_ZT = "012";											// 物流运单签收，证通厂商
	public static final String COD_ORDEREXCEPTION_ZT = "013";										// 物流异常订单，证通厂商
	public static final String COD_ORDERINQUIRY_ZT = "014";											// 物流派单查询，证通厂商
	public static final String COD_SIGNIN_ZT = "015";												// 物流操作员签到，证通厂商
	public static final String COD_PIC_SIGNIN_ZT = "017";											// 物流操作员签名，证通厂商
	public static final String COD_ACCOUNT_PAY = "132";												// 物流账户支付
	public static final String COD_ORDERPURCHASE_PREPAYCARD = "133";								// 物流订单消费-储值卡

	public static final String COD_ORDERPURCHASE_PD = "018";										// 物流订单消费,拍档
	public static final String COD_SIGNORDER_NEWLAND_PD = "019";	 								// 物流运单签收，拍档
	public static final String COD_ORDEREXCEPTION_NEWLAND_PD = "020";								// 物流异常订单，拍档
	public static final String COD_ORDERINQUIRY_NEWLAND_PD = "021";									// 物流派单查询，拍档
	public static final String COD_SIGNIN_NEWLAND_PD = "022";										// 物流操作员签到，拍档
	public static final String OCD_QUERY_ORDER_BY_ORDERNOS = "023";									// 物流合单查询
	
	public static final String COMMON_UNICOM_TRXSOURCE = "070";								        //联通通用trxSource
	public static final String COMMON_UNIONBILLPURCHASE_SELFSERVICE = "071";						//联通自助终端账单缴费
	public static final String COMMON_UNIONBILLPURCHASE_MINI = "072";								//联通mini终端账单缴费
	public static final String COMMON_UNIONBILLPURCHASEREFUND = "073";								//联通缴费退款
	public static final String COMMON_UNIONBILLPURCHASE_PAY1 = "074";								//联通缴费--缴费易
	public static final String COMMON_UNIONBILLPURCHASEREVERSAL_PAY1 = "075";						//联通缴费冲正--缴费易
	public static final String UNICOM_TRX_FLAG = "PA";

	public static final String CHAIN_CHARGE_BY_BANKCARD = "113";									// 连锁加盟-刷卡消费-银行卡
	public static final String CHAIN_CHARGE_BY_PREPAIDCARD = "121";									// 连锁加盟-刷卡消费-储值卡
	public static final String CHAIN_PREPAIDCARD_PURCHASE = "122";									// 连锁加盟-储值卡消费
	public static final String CHAIN_CASHIERS_BY_BANKCARD = "111";									// 连锁加盟-收银台-银行卡
	public static final String CHAIN_CASHIERS_BY_PREPAIDCARD = "123";								// 连锁加盟-收银台-储值卡
	public static final String CHAIN_ORDER_PAY_BY_BANKCARD = "112";									// 连锁加盟-订单支付-银行卡
	public static final String CHAIN_ORDER_PAY_BY_PREPAIDCARD = "124";								// 连锁加盟-订单支付-储值卡
	public static final String CHAIN_PREPAIDCARD_RECHARGE = "125";									// 连锁加盟-储值卡充值
	public static final String CHAIN_QUERY_PREPAIDCARD_BALANCE = "102";								// 连锁加盟-储值卡查余
	public static final String CHAIN_PREPAIDCARD_PIN_MODIFY = "131";								// 连锁加盟-储值卡密码修改
	public static final String CHAIN_QUERY_ORDER = "008";											// 连锁加盟-订单查询
	public static final String CHAIN_QUERY_CUSTOMER = "101";										// 连锁加盟-订单支付公司查询

	public static final String COD_HK_PURCHASE_BY_BANKCARD = "150";									// 航空POS-无订单签收-银行卡
	public static final String COD_HK_PURCHASE_BY_PREPAIDCARD = "151";								// 航空POS-无订单签收-储值卡
	public static final String COD_HK_MANUAL_ORDER_BY_BANKCARD = "152";								// 航空POS-手工订单签收-银行卡
	public static final String COD_HK_MANUAL_ORDER_BY_PREPAIDCARD = "153";							// 航空POS-手工订单签收-储值卡
	public static final String COD_HK_SYSTEM_ORDER_BY_BANKCARD = "154";								// 航空POS-系统无订单签收-银行卡
	public static final String COD_HK_SYSTEM_ORDER_BY_PREPAIDCARD = "155";							// 航空POS-系统无订单签收-储值卡
	public static final String COD_HK_QUERY_ORDER = "156";											// 航空POS-订单查询
	public static final String COD_HK_SIGN_ORDER = "157";											// 航空POS-系统订单签收
	public static final String COD_HK_EXCEPTION = "158";											// 航空POS-异常订单
	public static final String COD_HK_MANUAL_ORDER_SIGN = "159";									// 航空POS-手工订单签收
	public static final String COD_HK_ORDER_REFUND = "160";											// 航空POS-退货订单查询
	
	public static final String COD_CQCCN_PRUCHASE_BANKCARD = "161";									//重庆有线-充值缴费-银行卡
	public static final String COD_CQCCN_MASTER_QUERY = "162";										//重庆有线-户主查询
	public static final String COD_CQCCN_PAYCANCEL = "163";											//重庆有线-缴费撤单
	
	public static final String COD_ANY_ASYN_NOTIFY = "164";											//COD-手动任意一笔异步通知
	
	public static final String COD_IPOS_ORDER_REFUND="165";  										//智能POS退货标志

    public static final String WITHHOLD_PURCHASE = "168";                            //代扣消费
    public static final String WITHHOLD_PURCHASE_CONFIRM = "169";                   //代扣消费确认
    
    public static final String WITHHOLD_COMM_PURCHASE = "216";                            //通用代扣消费
    public static final String WITHHOLD_COMM_PURCHASE_CONFIRM = "217";                   //通用代扣消费确认

    public static final String COMMON_CHARGE_BANKCARD = "171";                      //common_charge:Pay By BankCard
    public static final String COMMON_CHARGE_PREPAIDCARD = "172";                   //common_charge:pay By prepaidCard
    public static final String COMMON_CHARGE_ACCOUNT = "173";                       //common_charge:pay By account
    public static final String COMMON_CHARGE_NOTIFY = "174";                        //common_charge:pay notify
    public static final String COMMON_CHARGE_QUERY_ORDER = "175";                   //common_charge:query order
    public static final String COMMON_CHARGE_QUERY_CUSTOMER = "176";               //common_charge:query customer
    public static final String COMMON_CHARGE_SIGNIN = "177";                        //common_charge:signIn
    public static final String COMMON_CHARGE_BANKCARD_REVERSAL = "178";            //common_charge:bankcard reversal
    public static final String COMMON_CHARGE_PREPAIDCARD_REVERSAL = "179";        //common_charge:prepaidcard reversal
    public static final String COMMON_CHARGE_TRADE_CANCEL = "180";                 //common_charge:trade cancel
    public static final String COMMON_CHARGE_TRADE_REFUND = "181";                 //common_charge:trade refund
    public static final String COMMON_CHARGE_TRADE_CANCEL_REVERSAL = "182";       //common_charge:trade cancel reversal
    public static final String COMMON_CHARGE_PROXYPAY_BANKCARD = "166";           //common_charge:Proxy Pay By BankCard
    public static final String COMMON_CHARGE_PROXYPAY_PREPAIDCARD = "167";       //common_charge:Proxy Pay By PrepaidCard


    public static final String CYTY_QUERY_PREPAIDCARD_BALANCE = "184";                 //畅游体育-储值卡查余
    public static final String CYTY_PREPAIDCARD_RECHARGE = "183";       			   //畅游体育-储值卡充值
    public static final String CYTY_PREPAIDCARD_PURCHASE = "185";					   //畅游体育-储值卡消费

    public static final String CYTY_PREPAIDCARD_RECHARGE_CHECK = "188";       		   //畅游体育-储值卡充值密码校验
    public static final String CYTY_PREPAIDCARD_RECHARGE_BACK = "189";       		   //畅游体育-储值卡充值回执
    
    public static final String SQK_PREPAIDCARD_PURCHASE = "190";					   //省钱卡-储值卡消费冲正

    public static final String COD_HK_CASH_NOORDER = "197";							// 航空POS-无单支付
    
    public static final String LLBH_PHONE_CHECK = "198";                 //利利百汇-手机验证
    public static final String LLBH_QUERY = "199";                       //利利百汇-汇金汇分查询余额
    public static final String LLBH_PURCHASE = "200";                    //利利百汇-汇金汇分消费
    public static final String LLBH_VOID = "201";                        //利利百汇-汇金汇分撤销
    public static final String LLBH_REG = "202";                         //利利百汇-会员注册
    public static final String LLBH_RECHARGE = "203";                    //利利百汇-汇金充值
    public static final String LLBH_RECHARGE_BACK = "204";               //利利百汇-汇金充值回执
    public static final String LLBH_COMMON_PURCHASE = "213";             //利利百汇-通用消费
    public static final String AB_PAY_CONFIRM = "222";                   			//安邦缴费费确认
    
	/** 保险垫付交易 */
    public static final String COD_CREDIT_PURCHASE = "205";							//垫付消费
	public static final String COD_CREDIT_REPAYBACK = "206";						//垫付还款
	public static final String COD_INSURANCE_QUERY= "207";							//保险-保单查询
    //人保项目
    public static final String COD_GDRB_PRUCHASE_BANKCARD = "208";					 // 广东人保-银行卡支付
    public static final String COD_GDRB_TRADE_CANCEL = "209";							 // 广东人保-交易撤销
    public static final String COD_GDRB_PRUCHASE_BANKCARD_CONFIRM = "210";			 // 广东人保-缴费确认
    public static final String COD_GDRB_TRADE_CANCEL_CONFIRM  = "211";				 // 广东人保-撤销确认
    public static final String COD_GDRB_INSURANCE_CLAIM_PRUCHASE  = "212";				 // 广东人保-理赔垫付
    public static final String COD_GDRB_INSURANCE_CLAIMPRUCHASE_CONFIRM  = "215";		// 广东人保-理赔垫付_查询确认
    public static final String COD_GDRB_CREDITCARD_PRUCHASE="219";                       // 广东人保-出单垫付
    public static final String COD_GDRB_PAYBACK_PRUCHASE="220";                          // 广东人保-出单垫付的还款
    public static final String COD_GDRB_PAYBACK_PRUCHASE_CONFIRM="221";                 // 广东人保-出单垫付的还款_查询确认
    public static final String COD_GDRB_BANKCARD_PRUCHASE_CONFIRM="227";                 // 广东人保-缴费_查询确认
    public static final String COMMON_OWNTO_OWN_PRUCHASE="218";                         // 通用本对本消费交易处理

    public static final String YJSD_QUERY = "223";                       //益家时代-积分查询余额
    public static final String YJSD_PURCHASE = "224";                    //益家时代-积分消费
    public static final String YJSD_COMMON_PURCHASE = "225";             //益家时代-通用消费返积分
    public static final String YJSD_CHECK = "226";                       //益家时代-积分卡验证
    public static final String YJSD_PURCHASE_VOID = "222";               //益家时代-积分卡撤销
    public static final String YJSD_RECHARGE_VOID = "239";				 //益家时代-积分充值撤销
    
    public static final String PURCHASE_CONFIRM = "229";											//交易确认
    public static final String ZHESHANG_PURCHASE = "228";											//浙商保险消费
    public static final String WITHHOLD_CAMP_PURCHASE = "230";                            //支持银行和代扣通道的交易
    public static final String INSURE_COMPOS_PURCHASE = "235";							  //COMPOS保险消费
    public static final String INSURE_NORMAL_PURCHASE = "236";							  //普通保险消费
    public static final String UNDO_REVERSE = "231";                            //物流基准升级撤销冲正
    public static final String MULTI_PURCHASE = "237";												//多银行通道消费
    public static final String REAL_NAME_OPEN = "238";												//实名开通
    public static final String PREAUTH_CONFIRM = "240";
    public static final String PREAUTHVOID_CONFIRM = "241";
    public static final String AUTHSALE_CONFIRM = "242";
    public static final String AUTHSALEVOID_CONFIRM = "243";
	// -------------------物流交易类型------------------//
	public static final String COD_PURCHASE_TYPE_PREFIX = "2";										// 物流消费类型前缀
	public static final String CHAIN_ORDER_PAY = "2112";											// 订单支付
	public static final String RESPONSE_CODE_SUCCESS = "00";

	// -------------特殊卡信息 starts--------------------//
	public static final String SH_ISSUER = "00008";													// 尚仕发卡机构
	public static final String SH_PREFIX = "2011";													// 尚仕卡前缀
	public static final String SH_SUFFIX = "88";													// 尚仕卡后缀

	public static final String EY_ISSUER = "00007";													// 儿艺发卡机构
	public static final String EY_PREFIX = "0046336338800";											// 儿艺卡前缀
	public static final String TRACT_2_SEPARATOR = "=";												// 二磁道分割符
	
	public static final String DL_ISSUER = "00086";													//大连机场发卡机构
	//public static final String DL_ISSUER = "0064";//64											//大连机场发卡机构测试
	public static final String DL_PREFIX = "2011";													//大连机场卡前缀
	public static final String DL_PREFIX2 ="2012";													//大连机场卡前缀2
//	public static final String DL_PREFIX = "2011";													//大连机场测试
//	public static final String DL_ISSUER = "1064";													//大连机场发卡机构测试
	// -------------特殊卡信息 ends--------------------//

	public static final String POS_PURCHASE_TYPE_PREFIX = "1";										// 金融pos消费类型前缀
	/**
	 * 物流行业pos菜单标识
	 */
	public static final Map<String, Integer> codPosMenuMap = new HashMap<String, Integer>();
	static {
		codPosMenuMap.put(COD_SIGNIN_NEWLAND, 0);													// 签到
		codPosMenuMap.put(COD_ORDERPURCHASE, 1);
		codPosMenuMap.put(COD_SIGNORDER_NEWLAND, 2);
		codPosMenuMap.put(COD_ORDERINQUIRY_NEWLAND, 3);												// 派单查询
		codPosMenuMap.put(COD_ORDEREXCEPTION_NEWLAND, 4);
		codPosMenuMap.put(COD_ACCOUNT_PAY, 5);
		codPosMenuMap.put(COD_ORDERPURCHASE_PREPAYCARD, 6);
		codPosMenuMap.put(COD_ORDERPURCHASE_ZT, 7);
		codPosMenuMap.put(COD_SIGNORDER_ZT, 8);
		codPosMenuMap.put(COD_ORDEREXCEPTION_ZT, 9);
		codPosMenuMap.put(COD_ORDERINQUIRY_ZT, 10);
		codPosMenuMap.put(WITHHOLD_CAMP_PURCHASE, 11);
		codPosMenuMap.put(MULTI_PURCHASE, 12);
	}
	/**
	 * 连锁加盟行业POS菜单标识
	 */
	public static final Map<String, String> chainPosMenuMap = new HashMap<String, String>();
	static {
		chainPosMenuMap.put(CHAIN_CHARGE_BY_BANKCARD, "bankCardPurchase");							// 刷卡消费-银行卡
		chainPosMenuMap.put(CHAIN_CHARGE_BY_PREPAIDCARD, "prePaidCardPurchase");					// 刷卡消费-储值卡
		chainPosMenuMap.put(CHAIN_PREPAIDCARD_PURCHASE, "perPaidCard");								// 储值卡消费
		chainPosMenuMap.put(CHAIN_CASHIERS_BY_BANKCARD, "cashiersByBankCard");						// 收银台-银行卡消费
		chainPosMenuMap.put(CHAIN_CASHIERS_BY_PREPAIDCARD, "cashiersByPrePaidCard");				// 收银台-储值卡消费
		chainPosMenuMap.put(CHAIN_ORDER_PAY_BY_BANKCARD, "orderPayByBankCard");						// 订单支付-银行卡
		chainPosMenuMap.put(CHAIN_ORDER_PAY_BY_PREPAIDCARD, "orderPayByPrepaidCard");				// 订单支付-储值卡
		chainPosMenuMap.put(CHAIN_PREPAIDCARD_RECHARGE, "prepaidCardRecharge");						// 储值卡充值
		chainPosMenuMap.put(CHAIN_QUERY_PREPAIDCARD_BALANCE, "queryPrepaid");						// 储值卡余额查询
		chainPosMenuMap.put(CHAIN_QUERY_ORDER, "queryOrder");										// Pos订单查询
		chainPosMenuMap.put(CHAIN_QUERY_CUSTOMER, "queryCustomer");									// 订单支付公司查询
	}

	public static final Map<String, Integer> airPosMenuMap = new HashMap<String, Integer>();

	static {
		airPosMenuMap.put(COD_HK_PURCHASE_BY_BANKCARD, 1);											// 航空POS-无订单签收-银行卡
		airPosMenuMap.put(COD_HK_PURCHASE_BY_PREPAIDCARD, 1);										// 航空POS-无订单签收-储值卡
        airPosMenuMap.put(COD_HK_CASH_NOORDER, 1);										            // 航空POS-无订单签收-现金
		airPosMenuMap.put(COD_HK_MANUAL_ORDER_BY_BANKCARD, 2);										// 航空POS-手工订单签收-银行卡
		airPosMenuMap.put(COD_HK_MANUAL_ORDER_BY_PREPAIDCARD, 2);									// 航空POS-手工订单签收-储值卡
		airPosMenuMap.put(COD_HK_MANUAL_ORDER_SIGN, 2);												// 航空POS-手工订单签收
		airPosMenuMap.put(COD_HK_SYSTEM_ORDER_BY_BANKCARD, 3);										// 航空POS-系统无订单签收-银行卡
		airPosMenuMap.put(COD_HK_SYSTEM_ORDER_BY_PREPAIDCARD, 3);									// 航空POS-系统无订单签收-储值卡
		airPosMenuMap.put(COD_HK_QUERY_ORDER, 4);													// 航空POS-订单查询
		airPosMenuMap.put(COD_HK_SIGN_ORDER, 3);													// 航空POS-系统订单签收
		airPosMenuMap.put(COD_HK_EXCEPTION, 6);														// 航空POS-异常订单
		airPosMenuMap.put(COD_HK_ORDER_REFUND, 5);													//#######payMeune更改
		airPosMenuMap.put(MULTI_PURCHASE, 7);
	}

    public static final Map<String,Integer> commonChargePosMenuMap = new HashMap<String,Integer>();
    static {
        commonChargePosMenuMap.put(COMMON_CHARGE_BANKCARD,1);
        commonChargePosMenuMap.put(COMMON_CHARGE_PREPAIDCARD,2);
        commonChargePosMenuMap.put(COMMON_CHARGE_ACCOUNT,3);
        commonChargePosMenuMap.put(COMMON_CHARGE_NOTIFY,4);
        commonChargePosMenuMap.put(COMMON_CHARGE_QUERY_ORDER,5);
        commonChargePosMenuMap.put(COMMON_CHARGE_QUERY_CUSTOMER,6);
        commonChargePosMenuMap.put(COMMON_CHARGE_BANKCARD_REVERSAL,7);
        commonChargePosMenuMap.put(COMMON_CHARGE_PREPAIDCARD_REVERSAL,8);
        commonChargePosMenuMap.put(COMMON_CHARGE_TRADE_CANCEL,9);
        commonChargePosMenuMap.put(COMMON_CHARGE_TRADE_REFUND,10);
        commonChargePosMenuMap.put(COMMON_CHARGE_TRADE_CANCEL_REVERSAL,11);
        commonChargePosMenuMap.put(COMMON_CHARGE_SIGNIN,12);
        commonChargePosMenuMap.put(COMMON_CHARGE_PROXYPAY_PREPAIDCARD,13);
        commonChargePosMenuMap.put(COMMON_CHARGE_PROXYPAY_BANKCARD,14);
        commonChargePosMenuMap.put(LLBH_COMMON_PURCHASE,15);
        commonChargePosMenuMap.put(YJSD_COMMON_PURCHASE,15);
    }

    public static final Map<String,Integer> insurePosMenuMap = new HashMap<String,Integer>();
    static {
        insurePosMenuMap.put(COD_GDRB_PRUCHASE_BANKCARD,1);
        insurePosMenuMap.put(COD_GDRB_TRADE_CANCEL,2);
        insurePosMenuMap.put(COD_GDRB_INSURANCE_CLAIM_PRUCHASE,3);
    }

	// ---------------------------define pos menu end---------------------------------
	// ---------------------------define tag start -----------------------------------
	public static final String TAG_TRX_TYPE = "0000";												// FLD 0000 交易类型 ***
	public static final String TAG_OPERATOR_ID = "0001";											// FLD 0001 工号ID
	public static final String TAG_OPERATOR_PASSWORD = "0002";										// FLD 0002 密码
	public static final String TAG_OPERATOR_NAME = "0003";											// FLD 0003 姓名
	public static final String TAG_OPERATOR_COMPANY = "0004";										// FLD 0004 公司
	public static final String TAG_OPERATOR_MOBILE = "0005";										// FLD 0005 手机
	public static final String TAG_OPERATOR_COMPANY_CODE = "0006";									// FLD 0006 公司编号
    public static final String TAG_OPERATOR_NOTE = "0007";                                            // FLD 0007 备注
    public static final String TAG_BLUR_INQUIRE_FLAG = "0011";										// FLD 0011 查询类型 ***
	public static final String TAG_RECIPIENTS_NAME = "0012";										// FLD 0012 收件人姓名
	public static final String TAG_RECIPIENTS_ADDR = "0013";										// FLD 0013 收件人地址
	public static final String TAG_RECIPIENTS_MOBILE = "0014";										// FLD 0014 收件人电话
	public static final String TAG_SIGN_STATUS = "0015";											// FLD 0015 签收状态
	public static final String TAG_PAY_STATUS = "0016";												// FLD 0016 支付状态
	public static final String TAG_SIGN_DATE = "0017";												// FLD 0017 签收日期
	public static final String TAG_SENDTHING_COMPANY = "0018";										// FLD 0018 发件商
	public static final String TAG_SENDING_NOTICE = "0019";											// FLD 0019 派送须知
	public static final String TAG_PAY_DATE = "0020";												// FLD 0020 支付日期
	public static final String TAG_SIGNIN_PAYFASHION = "0021";										// FLD 0021 签收时所选支付方式 ***
	public static final String TAG_SELFSIGNIN_FLAG = "0020";										// FLD 0022 是否本人签收
	public static final String TAG_CHEQUE_NUMBER = "0023";											// FLD 0023 支票号
	public static final String TAG_SIGNINOPERATOR_NAME = "0024";									// FLD 0024 签收人姓名
	public static final String TAG_SIGNINOPERATOR_MOBILE = "0025";									// FLD 0025 签收人手机
	public static final String TAG_SIGNINOPERATOR_RELATION = "0026";								// FLD 0026 关系 nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn收结果
	public static final String TAG_CREATEORDER_FLAG = "0027";										// FLD 0027 是否有新创建的订单标识
	public static final String TAG_SENDTHING_COMPANY_BARCODE = "0028";								// FLD 0028 发件商条形码
	public static final String TAG_COD_REQUEST_ID = "0029";											// FLD 0029 物流流水号

	public static final String TAG_EXCEPTION_CODE = "0031";											// FLD 0031 异常码 ***
	public static final String TAG_EXCEPTION_MESSAGE = "0032";										// FLD 0032 异常信息
	public static final String TAG_EXCEPTION_NAUMBER = "0033";										// FLD 0033 异常件数
	public static final String TAG_EXCEPTION_TYPE = "0034";											// FLD 0033 异常类型
	public static final String TAG_EXCEPTION_MSG="0035";                                            // FLD 0035带层级关系的 异常码列表
	public static final String TAG_EXCEPTION_MSG_SOURCE="0036";                                    // FLD 0036带层级关系的 异常码来源
	public static final String TAG_EXCEPTION_LIST = "0041";											// FLD 0041不带层级关系的 异常码列表
	public static final String TAG_MEMBER_POINTS = "0042";											// FLD 0042 会员积分
	public static final String TAG_PURCHASE_INFO = "0043";											// FLD 0043 消费信息格式：条形码，数量|条形码，数量
	public static final String TAG_CUSTOMER_INFO = "0044";											// FLD 0044 支付商户信息 商户名A,商户编号A|商户名B,商户编号B|商户名C,商户C
	public static final String TAG_ISSUE_CARD_CUSTOMER_NO = "0045";									// FLD 0045 发卡商编号
	public static final String TAG_ISSUE_CARD_CUSTOMER_NAME = "0046";								// FLD 0046 发卡商名称
	public static final String TAG_RECHARGE = "0047";												// FLD 0047充值金额
	public static final String TAG_TRANSACTION_DATE = "0048";										// FLD 0048 交易日期
	public static final String TAG_GIVING_AMOUNT = "0049";											// FLD 0049赠送金额
	public static final String TAG_REBATE_AMOUNT = "0050";											// FLD 0050返利金额
	public static final String TAG_RECEIVE_CUSTOMER_NAME = "0051";									// FLD 0051收款方名称
	public static final String TAG_RECEIVE_CUSTOMER_NO = "0052";									// FLD 0052收款方编号
	public static final String TAG_ORDER_QUERY_TYPE = "0053";										// FLD 0053订单查询类型 1-扫描查询 2-票号查询 3-订单号查询 4-配送单号查询
	public static final String TAG_ORDER_DETAILS = "0054";											// FLD 0054订单明细
	public static final String TAG_PASSENGERS = "0055";												// FLD 0055旅客
	public static final String TAG_FLIGHT = "0056";													// FLD 0056航班信息
	public static final String TAG_FLIGHT_REMARK = "0057";											// FLD 0057航班备注
	public static final String TAG_PAY_CHINNAL = "0058";											// FLD 0058支付通道 0拆单1整单 默认整单支付
	public static final String TAG_PAID_AMOUNT = "0059";											// FLD 0059已付金额
	public static final String TAG_PAID_DETAILS = "0062";											// FLD 0062支付详情
	public static final String TAG_POS_LONGITUDE = "0063";											// FLD 0063POS所在位置的经度
	public static final String TAG_POS_LATITUDE = "0064";											// FLD 0064POS所在位置的纬度
	public static final String TAG_POS_MENU = "0065";												// FLD 0065POS功能权限

	public static final String TAG_POS_REFUND_AMOUNT = "0066";										// FLD 0066应退款金额
	public static final String TAG_POS_ODD_REFUND_AMOUNT = "0067";									// FLD 0067剩余退款金额
	public static final String TAG_POS_CHECK_SIGNER = "0068";										// FLD 0068核对签收人
	public static final String TAG_POS_CHECK_REFUND_INFO = "0069";									// FLD 0069核对退单信息
	public static final String TAG_POS_REFUND_PARAM = "0072";										// FLD 0072参考号+退货时间
	public static final String TAG_POS_REFUND_INFO = "0073";										// FLD 0073可退款信息

	//重庆有线相关
	public static final String TAG_CQCCN_MULTIPLE_PAY_INFO="0075";									//FLD 0075多次缴费信息 格式：4位账户编码+12位金额 以‘|’分割 
	public static final String TAG_CQCCN_QUERY_QRYTYPE="0076";										//FLD 0076三户查询类型
	public static final String TAG_CQCCN_QUERY_QRYID="0077";										//FLD 0077三户查询值
	public static final String TAG_CQCCN_MASTER_INFO1="0078";										//FLD 0078户主查询第一页信息(帐户基本信息)
	public static final String TAG_CQCCN_MASTER_INFO2="0079";										//FLD 0079户主查询第二页信息(帐户分业务信息)
	public static final String TAG_CQCCN_MASTER_INFO3="0080";										//FLD 0080户主查询第三页信息(帐户分业务欠费信息)

    public static final String TAG_MULTIPLE_CHARGES_IS_OPEN ="0081";				    //FLD 0081是否有多项收款
    public static final String TAG_MULTIPLE_CHARGES_ITEM ="0082";					//FLD 0082收费项目列表
    public static final String TAG_PAYER_MEMBER_NO ="0083";						    //FLD 0083会员卡号码
    public static final String TAG_MULTIPLE_CHARGES_DETAIL ="0084";				    //FLD 0084收费项目明细
    public static final String TAG_ORDER_AMOUNT ="0085";				                //FLD 0085订单金额
    public static final String TAG_BUSINESS_TYPE ="0086";                             //FLD 0086业务类型
    public static final String TAG_COD_BANKORDERID="0088";
   
    public static final String TAG_CAN_PURCHASE_VOID="0091";

    public static final String TAG_IDENTIFYING_CODE="0092";

    public static final String TAG_REPORT_NUMBER="0093";
    public static final String TAG_HOSPITAL_NUMBER="0094";
    public static final String TAG_HOSPITALIZATION_NUMBER="0095";
    public static final String TAG_SWIFT_NO="0096";
    public static final String TAG_CREIT_ACCOUNT="0097";
    public static final String TAG_INSURE_APPLICANT="0098";
    public static final String TAG_RECEIPT_REMARK="0099";
    public static final String TAG_TRADE_REMARK="0100"; 
    public static final String TAG_CARDHOLDER_NAME = "0110";                            //持卡人姓名
    public static final String TAG_CARDHOLDER_IDENTIFY = "0111";                        //持卡人身份证号
    public static final String TAG_VERSION_CODE = "0112";                        
    public static final String TAG_QUERY_DETAIL = "0113";                        
    public static final String TAG_CERTIFICATE_DETAIL = "0114";                        
	// ---------------------------define tag ends -----------------------------------

	public static final String PREAUTHORIZATION = "AUTH";											// 预授权交易类型 ,与核心平台对应

	public static final int SAMEUPATESASSORT_MCC_COUNT = 2;											// 同一个银联分类码内MCC码替换次数
	public static final int INDUSTRYMAPPING_MCC_COUNT = 2;											// MCC映射规则重次次数
	public static final int BANKCHANNEL_CUSTOMER_COUNT = 5;											// 替换成费率低的银行通道次数
	public static final int TRXSEND_BANK_COUNT = 2;													// 一笔交易去银行的次数
	public static final int BANKPOSCATI_RETRY_COUNT = 1;											// 去银行终端不可用的等待重试的次数
	public static final double TRXAMOUNT_LIMIT = 6000000.00;										// POSP平台交易金额限制
	public static final int PUTHREAD_WAIT_TIME = 2000;												// 消费或预授权当前银行通道终端不可用时，当前线程等待时间
	public static final int ORGTHREAD_WAIT_TIME = 10000;											// 走原银行通道终端不可用时，当前线程等待时间
	public static final int COMM_OWNTOOWN_TRXSENDBANK_COUNT = 1;									// 一笔通用本对本消费交易去银行的次数

	public static final String AUTHR_ID_RESP_POS = "ok";

	public static final String PREPAY_TRX_CHANNEL_NET = "NET";										// 预付费卡消费-线上订单
	public static final String PREPAY_TRX_CHANNEL_OFFLINE = "OFFLINE";								// 预付费卡消费-线下订单
	public static final String UNIONPAY_54_PREFIX = "0210156";										// 02：可用余额 10：储蓄账户 156:币种代码 C:贷方金额

	public static final String FRP_RESPCODE_NORESPONSE = "NORESPONSE";								// 银行接口

	public static final String POS_MTI_FUNDSQUIRY = "0200";											// 查余
	public static final String POS_PROC_CODE_FUNDSINQUIRY = "310000";								// 查余
	public static final String POS_ENTRY_MODE_CODE_021 = "021";										// 刷卡有密码
	public static final String[] MSGTOS;

	public static final Map<String, String> FRPCODE_ISSUER = new HashMap<String, String>();
	public static final Map<String, String> FRPCODE_CARDTYPE = new HashMap<String, String>();
	public static final Map<String, String> FRPCODE_BANKCUSTOMERNUMBER = new HashMap<String, String>();
	static {
		// 工行接口使用工行借记卡测试
		FRPCODE_ISSUER.put("9002003", "ICBC");
		FRPCODE_CARDTYPE.put("9002003", "DEBIT_CARD");
		FRPCODE_BANKCUSTOMERNUMBER.put("9002003", "210748160002");
		// 建行接口使用建行借记卡测试
		FRPCODE_ISSUER.put("9002002", "CCB");
		FRPCODE_CARDTYPE.put("9002002", "DEBIT_CARD");
		FRPCODE_BANKCUSTOMERNUMBER.put("9002002", "105584045110093");
		// 中行接口使用中行借记卡测试
		FRPCODE_ISSUER.put("9002006", "BOC");
		FRPCODE_CARDTYPE.put("9002006", "DEBIT_CARD");
		FRPCODE_BANKCUSTOMERNUMBER.put("9002006", "104110083981067");
		// 农行接口使用农行借记卡测试
		FRPCODE_ISSUER.put("9002007", "ABC");
		FRPCODE_CARDTYPE.put("9002007", "DEBIT_CARD");
		FRPCODE_BANKCUSTOMERNUMBER.put("9002007", "01005          ");

		// 银联接口使用中行借记卡测试
		FRPCODE_ISSUER.put("9002008", "BOC");
		FRPCODE_CARDTYPE.put("9002008", "DEBIT_CARD");
		FRPCODE_BANKCUSTOMERNUMBER.put("9002008", "403310058129501");
	}

	public static final String TEST_CCB_DEBIT_CARD_PAN = "A3Z2mi8xd4/ZBfooDu/fXJHwDHbfQcHlxiTg5xS9uRk=";
	public static final String TEST_CCB_DEBIT_CARD_TRACK2 = "A3Z2mi8xd4/ZBfooDu/fXGyqbPBSt1w8slCsyyPMSE4jxHIzvxUlyyyVh9/d5FBo";
	public static final String TEST_CCB_DEBIT_CARD_CLEARPIN = "r9af5J4NRsfZJOLUEcUThQ==";

	public static final String TEST_BOC_DEBIT_CARD_PAN = "hKUf1mzP0UBkQDG/kn7eMHAWpMaPp7a1zguRSV5Ot+0=";
	public static final String TEST_BOC_DEBIT_CARD_TRACK2 = "hKUf1mzP0UBkQDG/kn7eMOIg+AquOJXEEW+OenyZH5uIDNYS4rAn83vuLE1p+u0Y";
	public static final String TEST_BOC_DEBIT_CARD_CLEARPIN = "QHwPzy/lknr3LIKxO/5Xsw==";

	public static final String TEST_ICBC_DEBIT_CARD_PAN = "Q6m1LdSCKGzPDgp82RGs4uBRzqRV3rprxObWQWn0wRw=";
	public static final String TEST_ICBC_DEBIT_CARD_TRACK2 = "Q6m1LdSCKGzPDgp82RGs4gdl26JRlgYbG9+7j+ughe4GamhXQRt3VJlrH+JjhQM5";
	public static final String TEST_ICBC_DEBIT_CARD_CLEARPIN = "cANue0Dl1cgHWHUsImawfg==";
	public static final String TEST_KEY = "0000000000000000";

	public static final String TEST_ABC_DEBIT_CARD_PAN = "pQXrJjj4PHGbxCbyxkP8tSX2m4u4D89idO9vqdD82T0=";
	public static final String TEST_ABC_DEBIT_CARD_TRACK2 = "pQXrJjj4PHGbxCbyxkP8tUPHw+FyZZ7eCOWWGGnFjlpEENxRueuhmjUN05Pe+v1D";
	public static final String TEST_ABC_DEBIT_CARD_CLEARPIN = "r9af5J4NRsfZJOLUEcUThQ==";

	public static final String TEST_POS_CUSTOMERNUMBER = "10001676182";
	public static final String TEST_MONITOR_HANDLE_OPERATOR = "SYSTEM";
	public static final String TEST_TRANS_AMT = "000000000001";

	static {
		PropertyUtil propertyUtil = PropertyUtil.getInstance("checkaccount_pos");
		String mobiles = propertyUtil.getProperty("frp.9002003.err.mobiles");
		MSGTOS = mobiles.split(",");
	}

	public static final Map<TrxType, TrxType> map = new HashMap<TrxType, TrxType>();
	static {
		map.put(TrxType.PURCHASEVOID, TrxType.PURCHASE);
		map.put(TrxType.PURCHASEREVERSAL, TrxType.PURCHASE);
		map.put(TrxType.PURCHASEVOIDREVERSAL, TrxType.PURCHASE);
		map.put(TrxType.PURCHASE_REFUND, TrxType.PURCHASE);
		map.put(TrxType.PRE_AUTHORIZATIONVOID, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.PRE_AUTHORIZATIONVOIDREVERSAL, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.PRE_AUTHORIZATION_COMPLETION, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.PRE_AUTHORIZATION_COMPLETION_VOID, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.PRE_AUTHORIZATION_COMPLETION_VOIDREVERSAL, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.PRE_AUTHORIZATION_COMPLETION_REVERSAL, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.PRE_AUTHORIZATION_REVERSAL, TrxType.PRE_AUTHORIZATION);
		map.put(TrxType.HIRE_PURCHASEVOID, TrxType.HIRE_PURCHASE);
		map.put(TrxType.HIRE_PURCHASEREVERSAL, TrxType.HIRE_PURCHASE);
		map.put(TrxType.HIRE_PURCHASEVOIDREVERSAL, TrxType.HIRE_PURCHASE);
	}

	public static TrxType gettrxtype(TrxType trx) {
		TrxType orgTrxtype = (TrxType) map.get(trx);
		return orgTrxtype;
	}

	public static final Map<String, String> purchaseMap = new HashMap<String, String>();
	static {
		purchaseMap.put("002", "orderRelationPurchase");
		purchaseMap.put("003", "orderRelationPurchase");
		purchaseMap.put("005", "codOrderPurchase");
		purchaseMap.put("011", "codOrderPurchase");
		purchaseMap.put("018", "codOrderPurchase");
		purchaseMap.put("024", "prepaidCardPurchase");
		purchaseMap.put("025", "prepaidCardPurchase");
		purchaseMap.put("820", "prepaidCardPurchase");//易优客-储值卡消费
		purchaseMap.put("821", "prepaidCardPurchase");//易优客-储值卡充值
		// 预付费卡消费-委托收款
		purchaseMap.put(PREPAIDCART_PURCHASE_COMMISSION, "prepaidCardPurchase");
		purchaseMap.put("027", "jrtjPrepaidCardPurchase");
		purchaseMap.put("028", "jrtjPrepaidCardPurchase");
		purchaseMap.put("029", "jrtjPrepaidCardPurchase");
		purchaseMap.put("030", "jrtjPrepaidCardPurchase");
		purchaseMap.put("031", "jrtjPrepaidCardPurchase");
		purchaseMap.put("032", "jrtjPrepaidCardPurchase");
		purchaseMap.put("033", "jrtjPrepaidCardPurchase");
		purchaseMap.put("034", "jrtjPrepaidCardPurchase");
		purchaseMap.put("046", "jrtjPrepaidCardPurchase");
		purchaseMap.put("047", "jrtjPrepaidCardPurchase");
		purchaseMap.put("111", "codOrderPurchase");
		purchaseMap.put("112", "codOrderPurchase");
		purchaseMap.put("113", "codOrderPurchase");
		purchaseMap.put("121", "codPrepaidCardPurchase");
		purchaseMap.put("122", "codPrepaidCardPurchase");
		purchaseMap.put("123", "codPrepaidCardPurchase");
		purchaseMap.put("124", "codPrepaidCardPurchase");
		purchaseMap.put("125", "codPrepaidCardRecharge");
		purchaseMap.put("126", "codOrderPurchase");
		purchaseMap.put("132", "codOrderPurchase");
		purchaseMap.put("133", "codPrepaidCardPurchase");
		purchaseMap.put("161", "codOrderPurchase");
		purchaseMap.put("038", "discountPurchase");
		purchaseMap.put("039", "discountCardPurchase");
		purchaseMap.put("040", "commissionReceivablesPurchase");
		purchaseMap.put("041", "memberCardActive");
		purchaseMap.put("042", "giftPoints");
		purchaseMap.put("043", "voidPoints");
		purchaseMap.put("044", "couponPurchase");
		purchaseMap.put("045", "keepbook");
		purchaseMap.put("049", "hxmklPurchase");
		purchaseMap.put("050", "couponPurchaseBatch");
		purchaseMap.put("807", "qqMemberPurchase");
		purchaseMap.put("839", "qqMemberPurchase");
		purchaseMap.put("845", "qqMemberPurchase");
		purchaseMap.put("846", "qqMemberPurchase");
		purchaseMap.put("847", "qqMemberPurchase");
		purchaseMap.put("848", "qqMemberPurchase");
		purchaseMap.put("853", "qqMemberPurchase");
		purchaseMap.put("852", "qqMemberPurchase");
		purchaseMap.put("832", "qqMemberPurchase");
		purchaseMap.put("833", "qqMemberPurchase");
		purchaseMap.put("837", "qqMemberPurchase");
		
		
		purchaseMap.put(QQ_VIRTUALPAY_RECHARGE_CARD, "qqMemberPurchase");

		purchaseMap.put("060", "kypPurchase");
		purchaseMap.put("062", "fundPurchase");
		purchaseMap.put("063", "fundOpenAccount");
		
		purchaseMap.put(COMMON_UNIONBILLPURCHASE_SELFSERVICE, "unionBillPurchase");
		purchaseMap.put(COMMON_UNIONBILLPURCHASE_PAY1, "unionBillPurchase_pay1");

		purchaseMap.put(COD_HK_PURCHASE_BY_BANKCARD, "codOrderPurchase");
		purchaseMap.put(COD_HK_PURCHASE_BY_PREPAIDCARD, "codPrepaidCardPurchase");
		purchaseMap.put(COD_HK_MANUAL_ORDER_BY_BANKCARD, "codOrderPurchase");
		purchaseMap.put(COD_HK_MANUAL_ORDER_BY_PREPAIDCARD, "codPrepaidCardPurchase");
		purchaseMap.put(COD_HK_SYSTEM_ORDER_BY_BANKCARD, "codOrderPurchase");
		purchaseMap.put(COD_HK_SYSTEM_ORDER_BY_PREPAIDCARD, "codPrepaidCardPurchase");

        purchaseMap.put(COMMON_CHARGE_BANKCARD,"codOrderPurchase");
        purchaseMap.put(COMMON_CHARGE_PREPAIDCARD,"codPrepaidCardPurchase");
        purchaseMap.put(COMMON_CHARGE_ACCOUNT,"codOrderPurchase");
        purchaseMap.put(COMMON_CHARGE_PROXYPAY_PREPAIDCARD,"codPrepaidCardPurchase");
        purchaseMap.put(COMMON_CHARGE_PROXYPAY_BANKCARD,"codOrderPurchase");


        purchaseMap.put(CYTY_PREPAIDCARD_RECHARGE,"codOrderPurchase");
        purchaseMap.put(CYTY_PREPAIDCARD_RECHARGE_CHECK,"cytyPrepaidCardRecharge");
        purchaseMap.put(CYTY_PREPAIDCARD_RECHARGE_BACK,"cytyPrepaidCardRecharge");
        purchaseMap.put(CYTY_PREPAIDCARD_PURCHASE,"cytyPrepaidCardPurchase");
        
        purchaseMap.put(LLBH_PURCHASE,"llbhPurchase");
        purchaseMap.put(LLBH_PHONE_CHECK,"llbhPurchase");
        purchaseMap.put(LLBH_RECHARGE,"codOrderPurchase");
        purchaseMap.put(LLBH_RECHARGE_BACK,"llbhPurchase");
        purchaseMap.put(LLBH_COMMON_PURCHASE,"codOrderPurchase");
        
        purchaseMap.put(YJSD_PURCHASE,"costomPurchase");
        purchaseMap.put(YJSD_COMMON_PURCHASE,"yjsdOrderPurchase");

        purchaseMap.put(WITHHOLD_PURCHASE,"withholdPurchase");
        purchaseMap.put(WITHHOLD_COMM_PURCHASE,"withholdCommPurchase");
        purchaseMap.put(WITHHOLD_COMM_PURCHASE_CONFIRM,"withholdCommQuery");
       
        purchaseMap.put(CYTY_PREPAIDCARD_RECHARGE,"codOrderPurchase"); 
        purchaseMap.put(CYTY_PREPAIDCARD_RECHARGE_CHECK,"cytyPrepaidCardRecharge");
        purchaseMap.put(CYTY_PREPAIDCARD_RECHARGE_BACK,"cytyPrepaidCardRecharge");
        purchaseMap.put(CYTY_PREPAIDCARD_PURCHASE,"cytyPrepaidCardPurchase");
        purchaseMap.put(COD_CREDIT_PURCHASE, "codCreditPurchase");
        purchaseMap.put(MULTI_PURCHASE, "multiBankChannelPurchase");
        purchaseMap.put(WITHHOLD_CAMP_PURCHASE, "codWithHoldCampPurchase");
        purchaseMap.put(COD_CREDIT_REPAYBACK, "codCreditRepayback");
        purchaseMap.put(COD_GDRB_PAYBACK_PRUCHASE, "codPiccCreditRepayback");   //人保垫付还款
        purchaseMap.put(COD_GDRB_PRUCHASE_BANKCARD, "codPiccByRoutePurchase");
        purchaseMap.put(COD_GDRB_INSURANCE_CLAIM_PRUCHASE, "codClaimPurchase");
        purchaseMap.put(COD_GDRB_CREDITCARD_PRUCHASE, "codCreditCardPurchase");
        purchaseMap.put(INSURE_NORMAL_PURCHASE, "codPiccByRoutePurchase");
        purchaseMap.put(INSURE_COMPOS_PURCHASE, "codSunshineByRoutePurchase");
        purchaseMap.put(COMMON_OWNTO_OWN_PRUCHASE, "commonOwntoOwnPurchase");
        purchaseMap.put(ZHESHANG_PURCHASE, "zheShangInsurancePurchase");
        purchaseMap.put("defalut", "commonPurchase");
	}

	public static String getkeyTypeString(String trxSource) {
		String keyType = null;
		if (trxSource != null) {
			keyType = (String) purchaseMap.get(trxSource);
		}
		if (keyType == null) {
			keyType = (String) purchaseMap.get("defalut");
		}
		return keyType;
	}

	public static final Map<String, PosManufacturer> contentMessageMap = new HashMap<String, PosManufacturer>();// 报文头与POS厂商
	static {
		contentMessageMap.put("602200000000", PosManufacturer.HZR);
		contentMessageMap.put("602200000001", PosManufacturer.XDL);
		contentMessageMap.put("602200000002", PosManufacturer.ZT);
		contentMessageMap.put("602200000004", PosManufacturer.HZR);// 今日特价POS机
		contentMessageMap.put("602200000005", PosManufacturer.HZR);// 新国都POS机
		contentMessageMap.put("020030382580", PosManufacturer.HZR);// 索迪斯
	}

	public static final Map<String, String> jrtjIntegralBusinessTypeMap = new HashMap<String, String>();// 今日特价积分业务类型
	static {
		jrtjIntegralBusinessTypeMap.put("030", "INTEGRALSALE");
		jrtjIntegralBusinessTypeMap.put("031", "INTEGRALSALE");
		jrtjIntegralBusinessTypeMap.put("032", "INTEGRALRECHARGE");
		jrtjIntegralBusinessTypeMap.put("033", "INDUSTRYSALE");
		jrtjIntegralBusinessTypeMap.put("034", "INDUSTRYRECHARGE");
		jrtjIntegralBusinessTypeMap.put("035", "INTEGRALQUERY");
		jrtjIntegralBusinessTypeMap.put("036", "INDUSTRYQUERY");

	}

	public static final Map<String, String> jRTJBankStatusCodeMap = new HashMap<String, String>();
	static {
		jRTJBankStatusCodeMap.put("00", "00");
		jRTJBankStatusCodeMap.put("01", "01");
		jRTJBankStatusCodeMap.put("55", "02");
		jRTJBankStatusCodeMap.put("75", "03");
		jRTJBankStatusCodeMap.put("51", "04");
		jRTJBankStatusCodeMap.put("54", "05");
		jRTJBankStatusCodeMap.put("96", "06");
	}

	public static String getjRTJBankStatusCode(String posResCode) {
		String jRTJBankStatusCode = null;
		if (posResCode != null) {
			jRTJBankStatusCode = (String) jRTJBankStatusCodeMap.get(posResCode);
			if (jRTJBankStatusCode != null) {
				return jRTJBankStatusCode;
			}
		}
		jRTJBankStatusCode = (String) jRTJBankStatusCodeMap.get("96");
		return jRTJBankStatusCode;
	}

	/**
	 * 垫付pos返回码映射
	 */
	public static final String RESPONSECODE_CREDIT = "ResponseCode_CREDIT";
	/**
	 * 垫付返回码与信息关系
	 */
	public static final Map<String, String> creditRetCodMap = new HashMap<String, String>();

    static {
        creditRetCodMap.put("10000", "未知异常");
        creditRetCodMap.put("00", "成功");
        creditRetCodMap.put("01", "处理中");
        creditRetCodMap.put("2001", "费率未找到(商户费率设置有问题)");
        creditRetCodMap.put("2002", "费率明细未找到(商户费率设置有问题)");
        creditRetCodMap.put("2003", "信用绑定关系找不到(收款商户没有绑定三代信用商户)");
        creditRetCodMap.put("2004", "3代信用账户绑定关系找不到(三代信用商户没有绑定信用账户)");
        creditRetCodMap.put("3001", "签名校验失败");
        creditRetCodMap.put("3002", "交易密码无效 ");
        creditRetCodMap.put("3003", "二代平台订单创建异常");
        creditRetCodMap.put("3004", "业务订单重复");
        creditRetCodMap.put("3005", "业务订单不存在");
        creditRetCodMap.put("3006", "该投保单已经成功");
        creditRetCodMap.put("3007", "该投保单没有支付成功");
        creditRetCodMap.put("3008", "该投保单没有还款成功");
        creditRetCodMap.put("3009", "该投保单已经还款成功");
        creditRetCodMap.put("3010", "三代调用请求重复");
        creditRetCodMap.put("3011", "二代平台订单冲正失败");
        creditRetCodMap.put("3012", "金额校验失败");
        creditRetCodMap.put("3013", "原手续费没找到");
        creditRetCodMap.put("3014", "信用账户可用余额不足");
        creditRetCodMap.put("3015", "三代流水号已经存在,该请求是重复请求");
        creditRetCodMap.put("3016", "信用账户不存在");
        creditRetCodMap.put("3017", "信用账户账户状态不合法");
        creditRetCodMap.put("3018", "账户冻结记录不存在(授权码不存在)");
        creditRetCodMap.put("3019", "三代请求状态不合法");
        creditRetCodMap.put("3020", "该投保单正在处理中");
        creditRetCodMap.put("3021", "该投保单状态异常");
        creditRetCodMap.put("3022", "委托结算打款失败");
        creditRetCodMap.put("3023", "还款时间小于支付时间");
        creditRetCodMap.put("3024", "商户委托结算打款信息没找到");
        creditRetCodMap.put("3025", "委托结算打款信息重复");
    }
    public static final String SUN_RECEIPT_MSG ="阳光保险电话车险:40000-000-000|24小时客服电话:95510|深圳市分公司综合内勤电话:22200530";
    public static final String ERROR_MSG="交易失败,请联系易宝支付";
    public static final Map<String, String> showCreditRetCodMap = new HashMap<String, String>();
    static {
        showCreditRetCodMap.put("10000", ERROR_MSG);
        showCreditRetCodMap.put("00", "成功");
        showCreditRetCodMap.put("01", "处理中");
        showCreditRetCodMap.put("2001", ERROR_MSG);
        showCreditRetCodMap.put("2002", ERROR_MSG);
        showCreditRetCodMap.put("2003", ERROR_MSG);
        showCreditRetCodMap.put("2004", ERROR_MSG);
        showCreditRetCodMap.put("3001", ERROR_MSG);
        showCreditRetCodMap.put("3002", "交易密码无效 ");
        showCreditRetCodMap.put("3003", ERROR_MSG);
        showCreditRetCodMap.put("3004", ERROR_MSG);
        showCreditRetCodMap.put("3005", ERROR_MSG);
        showCreditRetCodMap.put("3006", "该投保单已经成功");
        showCreditRetCodMap.put("3007", ERROR_MSG);
        showCreditRetCodMap.put("3008", "该投保单没有还款成功");
        showCreditRetCodMap.put("3009", "该投保单已经还款成功");
        showCreditRetCodMap.put("3010", ERROR_MSG);
        showCreditRetCodMap.put("3011", ERROR_MSG);
        showCreditRetCodMap.put("3012", ERROR_MSG);
        showCreditRetCodMap.put("3013", ERROR_MSG);
        showCreditRetCodMap.put("3014", "信用账户余额不足");
        showCreditRetCodMap.put("3015", ERROR_MSG);
        showCreditRetCodMap.put("3016", ERROR_MSG);
        showCreditRetCodMap.put("3017", "信用账户已冻结");
        showCreditRetCodMap.put("3018", ERROR_MSG);
        showCreditRetCodMap.put("3019", ERROR_MSG);
        showCreditRetCodMap.put("3020", "该投保单正在处理中");
        showCreditRetCodMap.put("3021", ERROR_MSG);
        showCreditRetCodMap.put("3022", ERROR_MSG);
        showCreditRetCodMap.put("3023", ERROR_MSG);
        showCreditRetCodMap.put("3024", ERROR_MSG);
        showCreditRetCodMap.put("3025", ERROR_MSG);
    }
	/**
	 * POS程序中默认的生产测试终端号及限额Map
	 */
	public static final Map<String, Double> testCATINormMap = new HashMap<String, Double>();
	static {
		testCATINormMap.put("40101001", 1.0);
		testCATINormMap.put("50000000", 1.0);
		testCATINormMap.put("60001000", 1.0);
		testCATINormMap.put("60001100", 1.0);
	}
	/**
	 * 
	 * 代扣接口银行代码对照
	 * 
	 * DEBITICBC中国工商银行；
    * DEBITCCB 中国建设银行；
    * DEBITABC 中国农业银行；
    * DEBITBCM 中国交通银行；
    * DEBITCMBC 中国民生银行；
    * DEBITCMBCHIAN招商银行；
    * DEBITCPB 深圳平安银行；
    * DEBITCIB 中国兴业银行；
    * DEBITSDB 深圳发展银行
    * DEBITPSBC邮政储蓄
    *
	 */
	 public static Map<String,String> withHoldBankCodes = new HashMap<String,String>();

	 static {
	    withHoldBankCodes.put("ICBC", "DEBITICBC");          //工行
	    withHoldBankCodes.put("CCB", "DEBITCCB");           //建行
	    withHoldBankCodes.put("ABC", "DEBITABC");           //农行
	    withHoldBankCodes.put("BCM", "DEBITBCM");           //交行
	    withHoldBankCodes.put("CMBC", "DEBITCMBC");         //民生银行
	    withHoldBankCodes.put("CMB", "DEBITCMBCHIAN");      //招商银行
	    withHoldBankCodes.put("SZPAB", "DEBITCPB");         //深圳平安银行
	    withHoldBankCodes.put("CIB", "DEBITCIB");           //平安银行
	    withHoldBankCodes.put("SDB", "DEBITSDB");           //深发展
	    withHoldBankCodes.put("PSBC", "DEBITPSBC");         //中国邮政储蓄银行
	    withHoldBankCodes.put("PSBC", "DEBITPSBC");         //中国邮政储蓄银行
	    withHoldBankCodes.put("BOC", "DEBITBOC");           //中国银行
	 }
	 
	 	/**
		 * 
		 * 实名代扣接口银行代码对照
		 */
		 public static Map<String,String> realNameWithHoldBankCodes = new HashMap<String,String>();

		 static {
			 realNameWithHoldBankCodes.put("ABC", "DEBITABC");           //农行
			 realNameWithHoldBankCodes.put("BOC", "DEBITBOC");           //中行
			 realNameWithHoldBankCodes.put("BCM", "DEBITBCM");           //交行
			 realNameWithHoldBankCodes.put("PSBC", "DEBITPSBC");         //中国邮政储蓄银行
			 realNameWithHoldBankCodes.put("ICBC", "DEBITICBC");          //工行
			 realNameWithHoldBankCodes.put("CCB", "DEBITCCB");           //建行
			 realNameWithHoldBankCodes.put("CMBC", "DEBITCMBC");         //民生银行
			 realNameWithHoldBankCodes.put("CMB", "DEBITCMBCHIAN");     //招行
			 realNameWithHoldBankCodes.put("SZPAB", "DEBITCPB");           //深圳平安银行
			 realNameWithHoldBankCodes.put("CIB", "DEBITCIB");           //兴业银行
			 realNameWithHoldBankCodes.put("SDB", "DEBITSDB");           //深圳发展银行
			 realNameWithHoldBankCodes.put("CEB", "DEBITCEB"); 				// 光大银行
			 realNameWithHoldBankCodes.put("SZPAB", "DEBITSZPAB"); 			// 平安银行
			 realNameWithHoldBankCodes.put("CITIC", "DEBITCITIC"); 			// 中信银行
		 }
	 
	/**
	 * 
	 * 无鉴权代扣接口银行编码对照
	 * 
	 * ICBC中国工商银行； CCB 中国建设银行； ABC 中国农业银行； BCM 中国交通银行； CMBC 中国民生银行；
	 * CMBCHIAN招商银行； CPB 深圳平安银行； CIB 中国兴业银行； SDB 深圳发展银行 PSBC邮政储蓄
	 * 
	 */
	public static Map<String, String> noAuthBankCodes = new HashMap<String, String>();
	static {
		noAuthBankCodes.put("ICBC", "102"); // 工行
		noAuthBankCodes.put("CCB", "105"); // 建行
		noAuthBankCodes.put("ABC", "103"); // 农行
		noAuthBankCodes.put("BCM", "301"); // 交行
		noAuthBankCodes.put("CMBC", "305"); // 民生银行
		noAuthBankCodes.put("CMB", "308"); // 招商银行
		noAuthBankCodes.put("BOC", "104"); // 中国银行
		noAuthBankCodes.put("CIB", "309"); // 兴业银行
		noAuthBankCodes.put("SDB", "307"); // 深证发展银行
		noAuthBankCodes.put("PSBC", "403"); // 中国邮政储蓄银行
		noAuthBankCodes.put("CEB", "303"); // 光大银行
		noAuthBankCodes.put("SZPAB", "783"); // 平安银行
		noAuthBankCodes.put("CITIC", "302"); // 中信银行
	}

	/**
	 * 
	 * 卡类型编码对照
	 * 
	 * 
	 */
	public static Map<String, String> cardType = new HashMap<String, String>();
	static {
		cardType.put("DEBIT_CARD", "0101"); // 个人借记卡
		cardType.put("CREDIT_CARD", "0103"); // 个人贷记卡账户
	}
	 
	 /**
	  * 消费撤销类型map add by lei-zhao 2012-12-20 begin
	  */
	public static final Map<String, String> purchaseVoidMap = new HashMap<String, String>();
	static {
		//通用消费撤销
		purchaseVoidMap.put("default", "commonPurchaseVoid");
		//行业客户化消费撤销
		purchaseVoidMap.put("industry", "customizationPurchaseVoid");

	}
	
	public static String getPurchaseVoidType(String trxSource){
		String keyType = null;
		if(StringUtils.isBlank(trxSource)){
			keyType = (String)purchaseVoidMap.get("default");
		}else{
			keyType = (String)purchaseVoidMap.get("industry");
		}
		return keyType;
	}
	
	/**
	 * 消费撤销冲正类型map add by hongchao.li 2012-12-20 begin
	 */
	public static final Map<String, String> purchaseVoidReversalMap = new HashMap<String, String>();

	static {
		//行业客户化消费撤销冲正
		purchaseVoidReversalMap.put("industry", "customizationPurchaseVoidReversal");
		//通用消费撤销冲正
		purchaseVoidReversalMap.put("default", "commonPurchaseVoidReversal");
		

	}

	public static String getPurchaseVoidReversalType(String trxSource) {
		String keyType = null;
		if(StringUtils.isBlank(trxSource)){
			keyType = (String)purchaseVoidReversalMap.get("default");
		}else{
			keyType = (String)purchaseVoidReversalMap.get("industry");
		}
		return keyType;
	}

	/**
	 * end
	 */

	/**
	 * 消费冲正类型map add by hongchao.li 2012-12-20 begin
	 */
	public static final Map<String, String> purchaseReversalMap = new HashMap<String, String>();


	static {
		//行业客户化冲正
		purchaseReversalMap.put("industry", "customizationPurchaseReversal");
		//通用冲正
		purchaseReversalMap.put("default", "commonPurchaseReversal");
	}

	public static String getPurchaseReversalType(String trxSource) {
		String keyType = null;
		if(StringUtils.isBlank(trxSource)){
			keyType = (String)purchaseReversalMap.get("default");
		}else{
			keyType = (String)purchaseReversalMap.get("industry");
		}
		return keyType;
	}
	/**
	 * end
	 */

	public static final List<String> REAL_CUSTOMER_NUMBER = new ArrayList<String>();// 中旅储值卡平台商编
	public static final String REAL_BANK_CUSTOMER_NUMBER = "104110045114162";//中旅储值卡银行商编
	
	//预付费卡充值新模式临时更改方案    by qijun.zhou  in 20131022  begin
	static {
		REAL_CUSTOMER_NUMBER.add("10012009103");
		REAL_CUSTOMER_NUMBER.add("10012136030");
	}
	//################    by qijun.zhou  in 20131022  end
	
	public static final int TOTAL_BANK_CUSTOMER = 50;//单个通道银行商户号轮循次数
	
	/**
	 * 退款时不能实时退款的商户集合，记录customer中的remark字段  add by hongchao.li 2013-9-24  begin
	 */
	
	public static final List<String> REFUND_RECORED_CUSTOMERS = new ArrayList<String>();
	
	/**
	 * 盒子支付标识 
	 */
	public static final String IBOXPAY = "IBOXPAY";
	//金融IC卡识别码——22域值
	public static final Object INPUT_TYPE051 = "051";
	public static final String INPUT_TYPE052 = "052";
	
	static {
		REFUND_RECORED_CUSTOMERS.add(IBOXPAY);
	}
	
	
	/**
	 * end
	 */
}
